package com.audaque.springboot.foshanupload.web.mpjdemo.mpgt.service.impl;

import com.audaque.springboot.foshanupload.web.mpjdemo.mpgt.model.entity.ActDef;
import com.audaque.springboot.foshanupload.web.mpjdemo.mpgt.mapper.ActDefMapper;
import com.audaque.springboot.foshanupload.web.mpjdemo.mpgt.service.IActDefService;
import com.github.yulichang.base.MPJBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 流程定义 服务实现类
 * </p>
 *
 * @author chinaben
 * @since 2023-04-07
 */
@Service
public class ActDefServiceImpl extends MPJBaseServiceImpl<ActDefMapper, ActDef> implements IActDefService {

    @Autowired
    private ActDefMapper actDefMapper;


    @Override
    public List<Integer> batchSave(List<ActDef> params) {
        actDefMapper.insertBatchSomeColumn(params);
        List<Integer> collect = params.stream().map(e -> e.getId()).collect(Collectors.toList());
        return collect;
    }
}
